/*
 * @Date: 2022-08-12 10:39:42
 * @LastEditors: zhangwenqiang
 * @LastEditTime: 2022-08-12 10:42:29
 * @FilePath: /raycloud-ops-web/src/components/buttonMany/Index.js
 */
import { DownOutlined } from '@ant-design/icons';
import { Dropdown, Menu, Space } from 'antd';
import React from 'react';
import Action from "@c/buttonAction/Index";


class ButtonMany extends React.Component {

  render(){
    const { rowData,onEditHostBtn,onEditRenewalPriceBtn,onCmsAgentProcessesBtn} = this.props
    const menu = (
      <Menu
        items={[
          {
            label: (
            <Action.Button onClick={() => onEditHostBtn(rowData)}>编辑</Action.Button>
            ),
            key: '0',
          },
          {
            label: (
            <Action.Button onClick={() => onEditRenewalPriceBtn(rowData.instance_id)}>询价</Action.Button>
            ),
            key: '1',
          },
          {
            label: (
                <Action.Button onClick={() => onCmsAgentProcessesBtn(rowData.instance_id)}>监控</Action.Button>
            ),
            key: '2',
          },
        ]}
      />
    );
    return (
      <Dropdown overlay={menu}>
        <Action.Button>
            <Space>
                更多
                <DownOutlined />
            </Space>
        </Action.Button>
    </Dropdown>
    )
  }
}
export default ButtonMany;